VERSION 5.00
Begin VB.Form frmRadGrad 
   BorderStyle     =   5  'Sizable ToolWindow
   Caption         =   "RadGrad"
   ClientHeight    =   9030
   ClientLeft      =   60
   ClientTop       =   300
   ClientWidth     =   6975
   Icon            =   "frmRadGrad.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   602
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   465
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton btnDraw 
      Caption         =   "Draw Gradient"
      Height          =   375
      Left            =   4680
      TabIndex        =   25
      Top             =   7320
      Width           =   1455
   End
   Begin VB.TextBox txtCmd 
      Height          =   285
      Left            =   480
      TabIndex        =   22
      Top             =   8520
      Width           =   6135
   End
   Begin VB.HScrollBar R 
      Height          =   255
      Left            =   1560
      Max             =   60
      Min             =   1
      TabIndex        =   18
      Top             =   6600
      Value           =   1
      Width           =   5055
   End
   Begin VB.HScrollBar Y 
      Height          =   255
      Left            =   1560
      Max             =   0
      TabIndex        =   17
      Top             =   6240
      Width           =   5055
   End
   Begin VB.HScrollBar X 
      Height          =   255
      Left            =   1560
      Max             =   0
      TabIndex        =   16
      Top             =   5880
      Width           =   5055
   End
   Begin VB.PictureBox picGrad 
      AutoRedraw      =   -1  'True
      DrawWidth       =   5
      Height          =   3495
      Left            =   360
      ScaleHeight     =   229
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   413
      TabIndex        =   6
      Top             =   600
      Width           =   6255
   End
   Begin VB.HScrollBar C 
      Height          =   255
      Index           =   0
      Left            =   960
      Max             =   255
      TabIndex        =   5
      Top             =   4320
      Width           =   2295
   End
   Begin VB.HScrollBar C 
      Height          =   255
      Index           =   1
      Left            =   960
      Max             =   255
      TabIndex        =   4
      Top             =   4680
      Width           =   2295
   End
   Begin VB.HScrollBar C 
      Height          =   255
      Index           =   2
      Left            =   960
      Max             =   255
      TabIndex        =   3
      Top             =   5040
      Width           =   2295
   End
   Begin VB.HScrollBar C2 
      Height          =   255
      Index           =   0
      Left            =   4320
      Max             =   255
      TabIndex        =   2
      Top             =   4320
      Width           =   2295
   End
   Begin VB.HScrollBar C2 
      Height          =   255
      Index           =   1
      Left            =   4320
      Max             =   255
      TabIndex        =   1
      Top             =   4680
      Width           =   2295
   End
   Begin VB.HScrollBar C2 
      Height          =   255
      Index           =   2
      Left            =   4320
      Max             =   255
      TabIndex        =   0
      Top             =   5040
      Width           =   2295
   End
   Begin VB.Label info3 
      BackStyle       =   0  'Transparent
      Caption         =   $"frmRadGrad.frx":000C
      Height          =   975
      Left            =   360
      TabIndex        =   24
      Top             =   7080
      Width           =   3975
   End
   Begin VB.Label info2 
      BackStyle       =   0  'Transparent
      Caption         =   "Here is your command:"
      Height          =   255
      Left            =   360
      TabIndex        =   23
      Top             =   8280
      Width           =   1695
   End
   Begin VB.Label lblR 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   360
      TabIndex        =   21
      Top             =   6600
      Width           =   1215
   End
   Begin VB.Label lblY 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   360
      TabIndex        =   20
      Top             =   6240
      Width           =   1215
   End
   Begin VB.Label lblX 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   360
      TabIndex        =   19
      Top             =   5880
      Width           =   1215
   End
   Begin VB.Label info 
      BackStyle       =   0  'Transparent
      Caption         =   "Imagine this box is your window. Here is a preview:"
      Height          =   255
      Left            =   360
      TabIndex        =   15
      Top             =   240
      Width           =   3615
   End
   Begin VB.Label lblR1 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   360
      TabIndex        =   14
      Top             =   4320
      Width           =   615
   End
   Begin VB.Label lblG1 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   360
      TabIndex        =   13
      Top             =   4680
      Width           =   615
   End
   Begin VB.Label lblB1 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   360
      TabIndex        =   12
      Top             =   5040
      Width           =   615
   End
   Begin VB.Label lblM1 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   360
      TabIndex        =   11
      Top             =   5400
      Width           =   615
   End
   Begin VB.Label lblR2 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   3720
      TabIndex        =   10
      Top             =   4320
      Width           =   615
   End
   Begin VB.Label lblG2 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   3720
      TabIndex        =   9
      Top             =   4680
      Width           =   615
   End
   Begin VB.Label lblB2 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   3720
      TabIndex        =   8
      Top             =   5040
      Width           =   615
   End
   Begin VB.Label lblM2 
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   3720
      TabIndex        =   7
      Top             =   5400
      Width           =   615
   End
End
Attribute VB_Name = "frmRadGrad"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub btnDraw_Click()
picGrad.ScaleMode = 1
picGrad.Cls
Radial picGrad, C(0).Value, C(1).Value, C(2).Value, C2(0).Value, C2(1).Value, C2(2).Value, X.Value * Screen.TwipsPerPixelX, Y.Value * Screen.TwipsPerPixelY, R.Value
picGrad.Refresh
picGrad.ScaleMode = 3
txtCmd.Text = "RadialGradient " & X.Value & COMMA & Y.Value & COMMA & R.Value & COMMA & C(0).Value & COMMA & C(1).Value & COMMA & C(2).Value & COMMA & C2(0).Value & COMMA & C2(1).Value & COMMA & C2(2).Value
End Sub

Private Sub C_Change(Index As Integer)
Call C_Scroll(Index)
End Sub

Private Sub C_Scroll(Index As Integer)
lblR1.Caption = C(0).Value
lblG1.Caption = C(1).Value
lblB1.Caption = C(2).Value
lblR1.BackColor = RGB(C(0).Value, 0, 0)
lblG1.BackColor = RGB(0, C(1).Value, 0)
lblB1.BackColor = RGB(0, 0, C(2).Value)
lblM1.BackColor = RGB(C(0).Value, C(1).Value, C(2).Value)
End Sub

Private Sub C2_Change(Index As Integer)
Call C2_Scroll(Index)
End Sub

Private Sub C2_Scroll(Index As Integer)
lblR2.Caption = C2(0).Value
lblG2.Caption = C2(1).Value
lblB2.Caption = C2(2).Value
lblR2.BackColor = RGB(C2(0).Value, 0, 0)
lblG2.BackColor = RGB(0, C2(1).Value, 0)
lblB2.BackColor = RGB(0, 0, C2(2).Value)
lblM2.BackColor = RGB(C2(0).Value, C2(1).Value, C2(2).Value)
End Sub

Private Sub Form_Load()
X.Max = picGrad.ScaleWidth
Y.Max = picGrad.ScaleHeight
End Sub

Private Sub R_Change()
Call R_Scroll
End Sub

Private Sub R_Scroll()
lblR.Caption = "Radius: " & R.Value
End Sub

Private Sub X_Change()
Call X_Scroll
End Sub

Private Sub X_Scroll()
lblX.Caption = "X: " & X.Value
End Sub

Private Sub Y_Change()
Call Y_Scroll
End Sub

Private Sub Y_Scroll()
lblY.Caption = "Y: " & Y.Value
End Sub
